package com.orhon.smartcampus.modules.teacher.mm;

import java.util.List;

import org.mapstruct.InheritConfiguration;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;
import org.mapstruct.factory.Mappers;

import com.orhon.smartcampus.modules.base.mm.DictionaryMapper;
import com.orhon.smartcampus.modules.base.mm.LangMapper;
import com.orhon.smartcampus.modules.base.mm.SchoolMapper;
import com.orhon.smartcampus.modules.teacher.entity.UndertakeProject;
import com.orhon.smartcampus.modules.teacher.gqlModel.GQLUndertakeProject;

@Mapper(
        uses={
                LangMapper.class,
                DictionaryMapper.class,
                TeacherMapper.class,
                SchoolMapper.class
        }
)
public interface UndertakeProjectMapper {
    UndertakeProjectMapper MAPPER = Mappers.getMapper(UndertakeProjectMapper.class);
    @Mappings({
            @Mapping(source="id",target="id"),
            @Mapping(source="teacher_id",target="teacher_id"),
            @Mapping(source="school_id",target="school_id"),
            @Mapping(source="time",target="time"),
            @Mapping(source="entime",target="entime"),
            @Mapping(source="fund",target="fund"),
            @Mapping(source="num",target="num"),
            @Mapping(source="image",target="image"),
            @Mapping(source="shenhe",target="shenhe"),
            @Mapping(source="createdBy",target="created_by"),
            @Mapping(source="updatedBy",target="updated_by"),
            @Mapping(source="createdAt",target="created_at"),
            @Mapping(source="updatedAt",target="updated_at"),
            @Mapping(source="deletedAt",target="deleted_at"),
            @Mapping(source="name",target="name"),
            @Mapping(source="unit",target="unit"),
            @Mapping(source="source",target="source"),
            @Mapping(source="inputstyle",target="inputstyle"),
            @Mapping(source="roal",target="roal"),

    })
    GQLUndertakeProject mapEntity(UndertakeProject entity);

    @InheritConfiguration(name = "mapEntity")
    List<GQLUndertakeProject> mapEntityList(List<UndertakeProject> entities);

}
